package com.xhai.common.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * <p>
 * 部门表
 * </p>
 *
 * @author xhai
 * @since 2025-05-24
 */
@Getter
@Setter
@ToString
@TableName("sys_dept")
@Schema(name = "SysDept", description = "部门表")
public class SysDept extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 部门ID
     */
    @Schema(description = "部门ID")
    @TableId(value = "DEPT_ID", type = IdType.ASSIGN_ID)
    private Long deptId;

    /**
     * 部门编码
     */
    @TableField("DEPT_CODE")
    @Schema(description = "部门编码")
    private String deptCode;

    /**
     * 部门名称
     */
    @TableField("DEPT_NAME")
    @Schema(description = "部门名称")
    private String deptName;

    /**
     * 备注
     */
    @TableField("REMARK")
    @Schema(description = "备注")
    private String remark;

    /**
     * 负责人
     */
    @TableField("LEADER")
    @Schema(description = "负责人")
    private String leader;

    /**
     * 电话
     */
    @TableField("PHONE")
    @Schema(description = "电话")
    private String phone;

    /**
     * 显示顺序
     */
    @TableField("ORDER_NUM")
    @Schema(description = "显示顺序")
    private Integer orderNum;

    /**
     * 上级部门ID，无上级部门为0
     */
    @TableField("PARENT_ID")
    @Schema(description = "上级部门ID，无上级部门为0")
    private Long parentId;

    /**
     * 所有上级部门id列表，以逗号分隔
     */
    @TableField("ANCESTORS")
    @Schema(description = "所有上级部门id列表，以逗号分隔")
    private String ancestors;
}
